<%--
  Created by IntelliJ IDEA.
  User: IFT8
  Date: 2015/3/9
  Time: 13:56
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
</head>
<body>
<h1>比较</h1>
<hr>
<span style="color: red; ">> : </span>${1 > 2} <span style="color: red; ">gt : </span>${1 gt 2} <br>
<span style="color: red; ">< : </span>${1 < 2} <span style="color: red; ">lt : </span>${1 lt 2} <br>
<span style="color: red; ">== : </span>${1 == 2} <span style="color: red; ">eq :</span>${1 eq 2} <br>
<span style="color: red; ">>= : </span>${1 >= 2} <span style="color: red; ">ge :</span>${1 ge 2} <br>
<span style="color: red; "><= : </span>${1 <= 2} <span style="color: red; ">le ：</span>${1 le 2} <br>
<span style="color: red; ">!= : </span>${1 != 2} <span style="color: red; ">ne ：</span>${1 ne 2}
<h1>empty 运算符</h1>
<hr>
可以用来判断对象是否为null后字符串是否为空字符串，或集合数组是否为空，或域中是否没有任何属性<br>
<%
    String str = "";
    String[] strs = {};
    pageContext.setAttribute("str", str);
    pageContext.setAttribute("strs", strs);
%>
<span style="color: red; ">empty str: </span>${empty str} <br>
<span style="color: red; ">empty strs: </span>${empty strs} <br>
<span style="color: red; ">empty pageScope: </span>${empty pageScope} <br>
<span style="color: red; ">empty sessionScope: </span>${empty sessionScope}
</body>
</html>
